﻿using System;
using System.ComponentModel;

namespace BindingFinder
{
    public class RelativeSource : System.Windows.Markup.MarkupExtension
    {
        public RelativeSource()
        {
        }
        public RelativeSource(string mode)
        {
            Mode = mode;
        }

        public RelativeSource(string mode, string ancestorType, int ancestorLevel)
        {
            Mode = mode;
            AncestorType = ancestorType;
            AncestorLevel = ancestorLevel;
        }

 

        [DefaultValue(null)]
        public string AncestorType { get; set; }
        [DefaultValue(null)]
        public string Mode { get; set; }
        public int AncestorLevel { get; set; }

        public override object ProvideValue(IServiceProvider serviceProvider)
        {
            return this;
        }
    }
}
